.container {
    display: flex;
    width: 50%;
    height: 500px;
    background-color: lightblue;
    margin: 10px;
}

.container>div {
    width: 120px;
    height: 120px;
}

.container>div:nth-child(2n+1) {
    background-color: lightsalmon;
}

.container>div:nth-child(2n) {
    background-color: lightgreen;
}

.container:nth-child(1) {
    flex-wrap: wrap-reverse;
    justify-content: space-between;
    align-content: flex-start;
}

.container:nth-child(2) {
    flex-direction: row;
    flex-wrap: nowrap;

}

.container:nth-child(2)>div:nth-child(2n+1) {
    flex-grow: 3;
    flex-shrink: 3;
}

.container:nth-child(2)>div:nth-child(2n) {
    flex-grow: 1;
    flex-shrink: 1;
}